class Solution:
    def getRow(self, rowIndex):
        row = [1]
        for _ in range(rowIndex):
            row = [x+y for x,y in zip([0]+row, row+[0])]
            #row = map(lambda x,y : x+y, [0]+row, row+[0])
        return row

print Solution().getRow(5)
